package 汽车租赁系统;

import java.util.Scanner;

public class KeChe extends Che {
    private int zuowei;

    public KeChe(String pinPai, String chepai, int zujin,int zuowei) {
        super(pinPai, chepai, zujin);
        this.zuowei=zuowei;
    }

    public int getZuowei() {
        return zuowei;
    }

    public void setZuowei(int zuiwei) {
        this.zuowei = zuiwei;
    }

    public double zu(int day) {
        if (day>=150){
            return this.getZujin()*day*0.6;
        }else if (day>=30){
            return this.getZujin()*day*0.7;
        }else if (day>=7){
            return this.getZujin()*day*0.8;
        }else if (day>=3){
            return this.getZujin()*day*0.9;
        }else{
            return this.getZujin()*day;
        }

    }
}
